package com.gmail.hongyz.myfuse.service.impl;

import java.util.List;

import com.gmail.hongyz.myfuse.common.PageObject;
import com.gmail.hongyz.myfuse.dao.BaseDao;
import com.gmail.hongyz.myfuse.dao.ProjectDao;
import com.gmail.hongyz.myfuse.model.Project;
import com.gmail.hongyz.myfuse.model.UserRole;
import com.gmail.hongyz.myfuse.service.ProjectService;

public class ProjectServiceImpl implements ProjectService {
	
	private BaseDao baseDao;
	private ProjectDao ProjectDao;

	public Project getProject(String id) {
		return ProjectDao.getProject(id);
	}

	public void removeProject(String id) {
		ProjectDao.removeProject(id);
	}

	public void saveProject(Project Project) {
		ProjectDao.saveProject(Project);
	}

	public void setProjectDao(ProjectDao ProjectDao) {
		this.ProjectDao = ProjectDao;
	}

	public List<Project> getProjects(PageObject pageObject) {
		return ProjectDao.getProjects(pageObject);
	}

	public void saveUserRole(UserRole userRole) {
		baseDao.save(userRole);
	}

	public List<UserRole> getUserRoles(String projectId) {
		return ProjectDao.getUserRoles(projectId);
	}

}
